package servlet_stanza;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao_stanza.GestoreStanza;

/**
 * Servlet implementation class gestioneStanza
 */
@WebServlet("/gestioneStanza")
public class gestioneStanza extends HttpServlet {
	private static final long serialVersionUID = 1L;
       private GestoreStanza gestore=new GestoreStanza();


	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	 
		RequestDispatcher rd;
		Integer id_stanza=Integer.parseInt(request.getParameter("id_stanza"));
		bean.Stanza stanza=gestore.findStanzabyId(id_stanza);
		request.setAttribute("stanza", stanza);
		rd=request.getRequestDispatcher("/monitoraggioStanza.jsp");
		rd.forward(request, response);
		
	}

}
